home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dld-3_23.lha / dld-3.2.3 / dld.h < prev    next >
C/C++ Source or Header  |  1991-05-30  |  3KB  |  64 lines

  1. /* Error codes */
  2.  
  3. #define DLD_ENOFILE    1        /* cannot open file */
  4. #define DLD_EBADMAGIC    2        /* bad magic number */
  5. #define DLD_EBADHEADER    3        /* failure reading header */
  6. #define DLD_ENOTEXT    4        /* premature eof in text section */
  7. #define DLD_ENOSYMBOLS    5        /* premature end of file in symbols */
  8. #define DLD_ENOSTRINGS    6        /* bad string table */
  9. #define DLD_ENOTXTRELOC    7        /* premature eof in text relocation */
  10. #define DLD_ENODATA    8        /* premature eof in data section */
  11. #define DLD_ENODATRELOC    9        /* premature eof in data relocation */
  12. #define DLD_EMULTDEFS    10        /* multiple definitions of symbol */
  13. #define DLD_EBADLIBRARY    11        /* malformed library archive */
  14. #define DLD_EBADCOMMON    12        /* common block not supported */
  15. #define DLD_EBADOBJECT    13        /* malformed input file (not rel or
  16.                        archive) */
  17. #define DLD_EBADRELOC    14        /* bad relocation info */
  18. #define DLD_ENOMEMORY    15        /* virtual memory exhausted */
  19. #define DLD_EUNDEFSYM    16        /* undefined symbol */
  20.  
  21. extern int dld_errno;            /* error code returned by dld */
  22. extern int dld_undefined_sym_count; /* # of undefined global symbols */
  23.  
  24. extern int dld_init ();            /* initialize the dld routines */
  25. extern int dld_link ();            /* dynamically link and load an object
  26.                        file */
  27. extern unsigned long
  28. dld_get_symbol ();            /* return the address of the named
  29.                        identifier  */
  30. extern unsigned long
  31. dld_get_func ();            /* return the address of the named
  32.                        function */
  33. extern unsigned long
  34. dld_get_bare_symbol ();            /* same as dld_get_symbol except that
  35.                        no underscore (_) is prepended.  Use
  36.                        to locate symbols defined by
  37.                        assembly routines. */
  38. extern int dld_unlink_by_file ();   /* unlink a file */
  39. extern int dld_unlink_by_symbol (); /* unlink the module that define the
  40.                        given symbol */
  41.  
  42. extern int
  43. dld_function_executable_p ();        /* return true if the named C function
  44.                        is executable */
  45.  
  46. extern char **
  47. dld_list_undefined_sym ();        /* return an array of undefined symbols */
  48.  
  49. extern char *
  50. dld_find_executable ();            /* return the full path name of the
  51.                        given executable file. */
  52.  
  53. extern int
  54. dld_create_reference ();        /* explicitly create a reference to the
  55.                        given symbol. */
  56.  
  57. extern int dld_define_sym ();        /* explicitly define the value for the
  58.                        given symbol. */
  59.  
  60. extern void
  61. dld_remove_defined_symbol ();        /* remove a explicitly defined symbol */
  62.  
  63. extern void dld_perror ();        /* print error messages. */
  64.